<?php
	require "../dao/staff_dao.php";
	
	$sturoll = [];
	$sturoll["sschool"] = $_POST['sschool'];
	$sturoll["spass"] = $_POST['spass'];
	$sturoll["sname"] = $_POST['sname'];
	$sturoll["snumber"] = $_POST['snumber'];
	$sturoll["ssex"] = $_POST['ssex'];
	$sturoll["ssys"] = $_POST['ssys'];
	$sturoll["senter"] = $_POST['senter'];
	$sturoll["sgrad"] = $_POST['sgrad'];
	$sturoll["sbirth"] = $_POST['sbirth'];
	$sturoll["sidnumber"] = $_POST['sidnumber'];
	$sturoll["snative"] = $_POST['snative'];
	$sturoll["sdesc"] = $_POST['sdesc'];
	$sturoll["scollegeid"] = $_POST['scollegeid'];
	$sturoll["sgradeid"] = $_POST['sgradeid'];
	$sturoll["sclassid"] = $_POST['sclassid'];
	
	$sturoll["simage"] = $_FILES['simage'];
	
	$flag = insertStuRoll($sturoll);
	
	if($flag){
?>
		<script>
			alert("添加成功。。。。");
			location.href='S_insertStu_roll.php';
		</script>
<?php
	}else{
?>
		<script>
			alert("添加失败。。。。");
			location.href='S_insertStu_roll.php';
		</script>
<?php
	}
?>